<!--
  Generated template for the SettingsPage page.

  See http://ionicframework.com/docs/components/#navigation for more info on
  Ionic pages and navigation.
-->
<ion-header>

  <ion-navbar>
    <ion-buttons start>
      <button ion-button icon-only (click)="dismiss(null)">
        <ion-icon name="arrow-back"></ion-icon>
      </button>
    </ion-buttons>
    <ion-title>{{ 'MODE_SETTINGS' | translate }}</ion-title>
  </ion-navbar>

</ion-header>


<ion-content>

  <ion-list radio-group [(ngModel)]="global.curEnvir">
    <ion-list-header>
      {{ 'OPERATION_ENVIRONMENT' | translate }}
    </ion-list-header>

    <ion-item>
      <ion-label>{{ 'PRODUCTION_MODE' | translate }}</ion-label>
      <ion-radio (click)="selectedEnvir('PRODUCTION_MODE')" value="PRODUCTION_MODE"></ion-radio>
    </ion-item>

    <ion-item>
      <ion-label>{{ 'SANDBOX_MODE' | translate }}</ion-label>
      <ion-radio (click)="selectedEnvir('SANDBOX_MODE')" value="SANDBOX_MODE"></ion-radio>
    </ion-item>
  </ion-list>

  <ion-list radio-group [(ngModel)]="global.curMode">
    <ion-list-header>
      {{ 'MODE' | translate }}
    </ion-list-header>

    <ion-item>
      <ion-label>{{ 'ONLINE_MODE' | translate }}</ion-label>
      <ion-radio (click)="selectedMode('ONLINE_MODE')" value="ONLINE_MODE"></ion-radio>
    </ion-item>

    <ion-item>
      <ion-label>{{ 'OFFLINE_MODE' | translate }}</ion-label>
      <ion-radio (click)="selectedMode('OFFLINE_MODE')" value="OFFLINE_MODE"></ion-radio>
    </ion-item>
  </ion-list>

  <ion-list>
    <ion-list-header>
      {{ 'DATA' | translate }}
    </ion-list-header>

    <ion-item class="download-background" (click)="downloadOfflineData('DOWNLOAD_ASK')">
      <button ion-button full class="download-background"><ion-icon name="cloud-download"></ion-icon>{{ 'DOWNLOAD_DATA' | translate }}</button>
    </ion-item>
  </ion-list>

</ion-content>